<?

require_once 'PHPUnit/Framework.php';
require_once 'qi/init.php';

class QiTestObjProxyCache extends PHPUnit_Framework_TestCase
{
	function test_array()
	{
		$array["foo"] = "bar";
		$array["FOO"] = "BAR";
		$array["bar"] = "foo";
		$array["BAR"] = "FOO";

		$proxy = new Qi_ObjProxyCache($array);

		$this->assertEquals(4, count($proxy));

		foreach ($array as $k=>$v):
			$this->assertTrue( isset($proxy[$k]) );
			$this->assertEquals($v, $proxy[$k]);
		endforeach;
	}
}

?>